<link href="../../../lib/My97DatePicker/skin/WdatePicker.css" rel="stylesheet" type="text/css">
<script language="javascript" type="text/javascript" src="../../../lib/My97DatePicker/WdatePicker.js"></script>


<div class="account-wrapper">
    <div class="account-body" ng-controller="questionAddCtrl">
        <h4>添加问题</h4>

        <form class="form account-form">
            <!--<div class="form-group">-->
            <!--<label class="control-label" for="textinput">displayOrder:</label>-->
            <!--<input class="form-control" ng-model="question.displayOrder" required tabindex="5">-->
            <!--</div>-->
            <!--<div class="form-group">-->
                <!--<label class="control-label" for="textinput">小区：&lt;!&ndash;community:&ndash;&gt;</label>-->
                <!--<br>-->
                <!--<label> <input style="zoom:1.8;margin-left: 10px;vertical-align:middle" ng-model="ck"-->
                               <!--type="checkbox" ng-click="allCheck(ck)"/>全选</label>-->
                <!--<br>-->
                <!--<label ng-repeat="m in communityLabelList.data">-->
                    <!--<input type="checkbox" style="zoom:1.8;margin-left: 10px;vertical-align:middle" ng-model="chk"-->
                           <!--ng-click="toggle(chk,m.objId)" name="chkItem"-->
                            <!--/> {{m.communityName}}-->
                <!--</label>-->
            <!--</div>-->
            <div class="form-group">
                <!--<label for="1" class="control-label col-xs-2">小区名称</label><br><br>-->
                <div style="width:500px;margin-left:0px;" class = "communitys-select">
                    <input type="text" ng-model="cname" class="form-control" id = "cname_filter" ng-change="cnameFilter(cname)" placeholder="搜索小区" style = "width: 200px;">
                    <br>
                    <table id="manyCommunity" style="width:500px;" border="0" style="width: 100%;">
                        <tr align="center">
                            <td width = "200">
                                <select id="communitys" multiple="multiple" ng-model="oneCommunity"
                                        style="width: 200px;height:300px;">
                                    <option ng-repeat="comm in communityLabelList.data" value="{{comm.objId}}">{{comm.communityName}}</option>
                                </select>
                                <!--| filter:cname-->
                            </td>
                            <td width = "100">
                                <input type="button" value=">>" id="addAllCommunity" ng-click="addAllCommunity()" /><br /><br />
                                <input type="button" value=">" id="addCommunity" ng-click="addCommunity()" /><br /><br />
                                <input type="button" value="<" id="removeCommunity" ng-click="removeCommunity()"/><br /><br />
                                <input type="button" value="<<" id="removeAllCommunity" ng-click="removeAllCommunity()"/>
                            </td>
                            <td>
                                <select id="selCommunitys" multiple="multiple"
                                        style="width: 200px;height:300px;" ng-model="crule.community_id">
                                    <option ng-repeat="comm in selectCcommunityListt" value="{{comm.objId}}">{{comm.communityName}}</option>
                                </select>
                            </td>

                        </tr>
                    </table>
                </div>
            </div>

            <div class="form-group">
                <label class="control-label" for="textinput">分类：<!--category:--></label>
                <select ng-model="question.category" ng-options="c.value as c.name for c in categoryList" required>
                </select>
                <span ng-show="question.category == 'neighbourActivity'">
                <label class="control-label" for="textinput">类型：<!--desc:--></label>

                <select ng-model="question.activityType" ng-options="c.value as c.name for c in activityTypeList"
                        required>
                </select></span>
            </div>

            <div class="form-group" ng-show="question.category == 'neighbourActivity'">
                <label class="control-label" for="textinput">标题：<!--desc:--></label>

                <input type="text" class="form-control" placeholder="不超过16个字"
                       ng-model="question.title" id="reply">
            </div>

            <div class="form-group" ng-show="question.category == 'neighbourActivity'">
                <label class="control-label" for="textinput">截止日期：<!--desc:--></label>
                <!--<div id="deadline" class="input-group date form_datetime col-md-5" data-date-format="yyyy-mm-dd h:ii"-->
                     <!--data-link-field="dtp_input1">-->
                    <!--<input style="margin-bottom: 0px"  class="form-control"size="16" type="text" value="" readonly-->
                           <!--ng-model="startTime">-->
                    <!--<span class="input-group-addon"><span class="glyphicon glyphicon-th"></span></span>-->
                <!--</div>-->
                <input type="text" class="Wdate" id="dead_line" onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'%y-%M-%d'})" />
            </div>

            <div class="form-group">
                <label class="control-label" for="textinput">描述：<!--desc:--></label>

                <textarea class="control-label" rows="5" ng-model="question.desc" required style="width:100%"
                          tabindex="7"></textarea>
            </div>

            <div class="form-group">
                <label class="control-label" for="textinput">图片(最多可上传6张):</label>
                <input type="file" id="images_upload"
                       onchange="angular.element(this).scope().selectFile(this.files)" multiple accept="image/*">

                <div id="image_result" class="image-result"></div>
            </div>
            <div class="form-group">
                <label class="control-label" for="textinput">标签：<!--community:--></label>
                <br>
                <label ng-repeat="m in tagList.data">
                    <input style="zoom:1.8;margin-left: 10px;vertical-align:middle" type="checkbox" ng-model="chk"
                           ng-click="tagToggle(chk,m.objId)"/>{{m.value}}
                </label>
            </div>

            <div class="form-group">
                <a ng-click="gotoQuestionListPage()" class="btn btn-xs btn-primary">取消</a>
                <a ng-click="createQuestion(question)" class="btn btn-xs btn-primary">确定</a>
            </div>
        </form>
    </div>
</div>